import { MigrationInterface, QueryRunner } from "typeorm";

export class AlterUser1703736141417 implements MigrationInterface {
    name = 'AlterUser1703736141417'

    public async up(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`
            CREATE UNIQUE INDEX \`idx_username\` ON \`user\` (\`username\`)
        `);
    }

    public async down(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`
            DROP INDEX \`idx_username\` ON \`user\`
        `);
    }

}
